A method of writing in a non-volatile memory of an electronic entity is known from document EP 2 164 031 comprising the following steps:                determining an operating state of the electronic entity;        in the event of abnormal operation, writing a first datum in a first area of the non-volatile memory;        in the event of normal operation, writing a second datum in a second area of the non-volatile memory.        
Writing the first datum in the first area of the non-volatile memory makes it possible to keep track of the detection of abnormal operation and optionally lead to locking the operation of the electronic entity, e.g. when a predetermined number of operating anomalies has been detected in the course of the successive operating phases of the electronic entity.
Writing the second datum in the second area of the non-volatile memory is aimed at simulating the above-mentioned writing in the first area, so that an attacker cannot distinguish cases of anomaly detection from cases of normal operation. Indeed the attacker seeks to detect such anomaly detection by the electronic entity in order to prevent the writing of the first datum and thereby avoid locking the electronic entity.
In line with this, document EP 2 164 031 teaches that writing in the first area and writing in the second area must have an identical signature with regard to their electrical consumption.